package cn.edu.xmu.oomall.liquidation.microservice;

import cn.edu.xmu.oomall.liquidation.microservice.vo.PaymentVo;
import cn.edu.xmu.oomall.liquidation.microservice.vo.RefundVo;
import cn.edu.xmu.oomall.liquidation.model.bo.StartInfo;
import cn.edu.xmu.oomall.liquidation.model.vo.PageVo;
import cn.edu.xmu.oomall.liquidation.model.vo.StartInfoVo;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.List;

/**
 * @author HertzLiu
 * @create_time 2021/12/16 18:28
 * @package_name cn.edu.xmu.oomall.liquidation.microservice
 * @project_name oomall
 * @product_name IntelliJ IDEA
 * @description 订单模块
 */

@FeignClient(name = "payment-service")
public interface PaymentService {
    @GetMapping("/")
    public InternalReturnObject<PageVo<PaymentVo>> getPaymentList(
            @RequestParam(value = "beginTime",required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) ZonedDateTime beginTime,
            @RequestParam(value = "beginTime",required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) ZonedDateTime endTime
    );

    @GetMapping("/")
    public InternalReturnObject<PageVo<RefundVo>> getRefundList(
            @PathVariable("shopId") Long shopId,
            @RequestParam(value = "beginTime",required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) ZonedDateTime beginTime,
            @RequestParam(value = "beginTime",required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) ZonedDateTime endTime
    );
}
